﻿using Api.Core.Model.Entity;
using Api.Core.Model.Table;
using Api.Core.Model.User;
using Api.Core.Model.ViewModel;
using AutoMapper;

namespace Api.Core.AutoMap
{
    public class ResourceToModelProfile : Profile
    {
        public ResourceToModelProfile()
        {
            //CreateMap<UserCredentials, UserEntity>();
            //CreateMap<UserEntity, UserCredentials>();
            //CreateMap<UserDto, UserEntity>();
            //CreateMap<UserEntity, UserDto>();
            //CreateMap<UserEntity, RoleEntityDto>();
            //CreateMap<RoleEntityDto, UserEntity>();

            //CreateMap<RoleDto, RoleEntity>();
            //CreateMap<RoleEntity, RoleDto>();

            //CreateMap<ModuleEntity, ModuleDto>();
            //CreateMap<ModuleDto, ModuleEntity>();
            CreateMap<UserEntity, UserTable>();
            CreateMap<UserTable, UserEntity>();

            CreateMap<UserEntity, UserGroupTable>();
            CreateMap<UserGroupTable, UserEntity>();

            CreateMap<RoleViewModel,RoleTable>();
            CreateMap<RoleTable,RoleViewModel>();

        }
    }
}
